3.2.73 \(\int \frac {a+b \log (c x^n)}{x (d+e \log (f x^m))} \, dx\) [173]

Optimal. Leaf size=71 \[ \frac {b n \log (x)}{e m}-\frac {b n \left (d+e \log \left (f x^m\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2}+\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m} \]

[Out]

b*n*ln(x)/e/m-b*n*(d+e*ln(f*x^m))*ln(d+e*ln(f*x^m))/e^2/m^2+(a+b*ln(c*x^n))*ln(d+e*ln(f*x^m))/e/m

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 6, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2339, 29, 2413, 12, 2436, 2332} \begin {gather*} \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac {b n \left (d+e \log \left (f x^m\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2}+\frac {b n \log (x)}{e m} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(x*(d + e*Log[f*x^m])),x]

[Out]

(b*n*Log[x])/(e*m) - (b*n*(d + e*Log[f*x^m])*Log[d + e*Log[f*x^m]])/(e^2*m^2) + ((a + b*Log[c*x^n])*Log[d + e*
Log[f*x^m]])/(e*m)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2413

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{x \left (d+e \log \left (f x^m\right )\right )} \, dx &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-(b n) \int \frac {\log \left (d+e \log \left (f x^m\right )\right )}{e m x} \, dx\\ &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac {(b n) \int \frac {\log \left (d+e \log \left (f x^m\right )\right )}{x} \, dx}{e m}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac {(b n) \text {Subst}\left (\int \log (d+e x) \, dx,x,\log \left (f x^m\right )\right )}{e m^2}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac {(b n) \text {Subst}\left (\int \log (x) \, dx,x,d+e \log \left (f x^m\right )\right )}{e^2 m^2}\\ &=\frac {b n \log (x)}{e m}-\frac {b n \left (d+e \log \left (f x^m\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2}+\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 58, normalized size = 0.82 \begin {gather*} \frac {b e m n \log (x)+\left (a e m-b d n-b e n \log \left (f x^m\right )+b e m \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(x*(d + e*Log[f*x^m])),x]

[Out]

(b*e*m*n*Log[x] + (a*e*m - b*d*n - b*e*n*Log[f*x^m] + b*e*m*Log[c*x^n])*Log[d + e*Log[f*x^m]])/(e^2*m^2)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.15, size = 1744, normalized size = 24.56

method result size
risch \(\text {Expression too large to display}\) \(1744\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/x/(d+e*ln(f*x^m)),x,method=_RETURNVERBOSE)

[Out]

-1/2*I/m*ln(e*Pi*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^m)-e*Pi*csgn(I*f)*csgn(I*f*x^m)^2-e*Pi*csgn(I*x^m)*csgn(I*f*
x^m)^2+e*Pi*csgn(I*f*x^m)^3+2*I*e*ln(f)+2*I*ln(x^m)*e+2*I*d)/e*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+1/2*I/
m*ln(e*Pi*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^m)-e*Pi*csgn(I*f)*csgn(I*f*x^m)^2-e*Pi*csgn(I*x^m)*csgn(I*f*x^m)^2+
e*Pi*csgn(I*f*x^m)^3+2*I*e*ln(f)+2*I*ln(x^m)*e+2*I*d)/e*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+1/2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n)-b/e/m^2*ln(e*Pi*csgn(I*f)*c
sgn(I*x^m)*csgn(I*f*x^m)-e*Pi*csgn(I*f)*csgn(I*f*x^m)^2-e*Pi*csgn(I*x^m)*csgn(I*f*x^m)^2+e*Pi*csgn(I*f*x^m)^3+
2*I*ln(x)*e*m+2*I*e*ln(f)+2*I*e*(ln(x^m)-m*ln(x))+2*I*d)*n*ln(x^m)-b/e^2/m^2*ln(e*Pi*csgn(I*f)*csgn(I*x^m)*csg
n(I*f*x^m)-e*Pi*csgn(I*f)*csgn(I*f*x^m)^2-e*Pi*csgn(I*x^m)*csgn(I*f*x^m)^2+e*Pi*csgn(I*f*x^m)^3+2*I*ln(x)*e*m+
2*I*e*ln(f)+2*I*e*(ln(x^m)-m*ln(x))+2*I*d)*d*n

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 120, normalized size = 1.69 \begin {gather*} \frac {b e^{\left (-1\right )} \log \left (c x^{n}\right ) \log \left ({\left (e \log \left (f\right ) + e \log \left (x^{m}\right ) + d\right )} e^{\left (-1\right )}\right )}{m} - \frac {{\left ({\left (e \log \left (f\right ) + e \log \left (x^{m}\right ) + d\right )} e^{\left (-1\right )} \log \left ({\left (e \log \left (f\right ) + e \log \left (x^{m}\right ) + d\right )} e^{\left (-1\right )}\right ) - {\left (e \log \left (f\right ) + e \log \left (x^{m}\right ) + d\right )} e^{\left (-1\right )}\right )} b n e^{\left (-1\right )}}{m^{2}} + \frac {a e^{\left (-1\right )} \log \left ({\left (e \log \left (f\right ) + e \log \left (x^{m}\right ) + d\right )} e^{\left (-1\right )}\right )}{m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*log(f*x^m)),x, algorithm="maxima")

[Out]

b*e^(-1)*log(c*x^n)*log((e*log(f) + e*log(x^m) + d)*e^(-1))/m - ((e*log(f) + e*log(x^m) + d)*e^(-1)*log((e*log
(f) + e*log(x^m) + d)*e^(-1)) - (e*log(f) + e*log(x^m) + d)*e^(-1))*b*n*e^(-1)/m^2 + a*e^(-1)*log((e*log(f) +
e*log(x^m) + d)*e^(-1))/m

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 56, normalized size = 0.79 \begin {gather*} \frac {{\left (b m n e \log \left (x\right ) + {\left (b m e \log \left (c\right ) - b n e \log \left (f\right ) - b d n + a m e\right )} \log \left (m e \log \left (x\right ) + e \log \left (f\right ) + d\right )\right )} e^{\left (-2\right )}}{m^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*log(f*x^m)),x, algorithm="fricas")

[Out]

(b*m*n*e*log(x) + (b*m*e*log(c) - b*n*e*log(f) - b*d*n + a*m*e)*log(m*e*log(x) + e*log(f) + d))*e^(-2)/m^2

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \log {\left (c x^{n} \right )}}{x \left (d + e \log {\left (f x^{m} \right )}\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/x/(d+e*ln(f*x**m)),x)

[Out]

Integral((a + b*log(c*x**n))/(x*(d + e*log(f*x**m))), x)

________________________________________________________________________________________

Giac [A]
time = 5.49, size = 85, normalized size = 1.20 \begin {gather*} \frac {b n e^{\left (-1\right )} \log \left (x\right )}{m} + \frac {{\left (b m e \log \left (c\right ) - b n e \log \left (f\right ) - b d n + a m e\right )} e^{\left (-2\right )} \log \left (\frac {1}{4} \, {\left (\pi m {\left (\mathrm {sgn}\left (x\right ) - 1\right )} e + \pi {\left (\mathrm {sgn}\left (f\right ) - 1\right )} e\right )}^{2} + {\left (m e \log \left ({\left | x \right |}\right ) + e \log \left ({\left | f \right |}\right ) + d\right )}^{2}\right )}{2 \, m^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*log(f*x^m)),x, algorithm="giac")

[Out]

b*n*e^(-1)*log(x)/m + 1/2*(b*m*e*log(c) - b*n*e*log(f) - b*d*n + a*m*e)*e^(-2)*log(1/4*(pi*m*(sgn(x) - 1)*e +
pi*(sgn(f) - 1)*e)^2 + (m*e*log(abs(x)) + e*log(abs(f)) + d)^2)/m^2

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x^n\right )}{x\,\left (d+e\,\ln \left (f\,x^m\right )\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))/(x*(d + e*log(f*x^m))),x)

[Out]

int((a + b*log(c*x^n))/(x*(d + e*log(f*x^m))), x)

________________________________________________________________________________________